Establish a standard mqtt connection

Establish mqtt connection.

Request:

"|4|1|1|host|port|iotid|iotpwd|\r"

Parameters:

host connection host of IoT

port mqtt connection port

iotid IoT account

iotpwd IoT password

Returns:

"|4|1|1|1|\r" mqtt connection status: successfully connected.

"|4|1|1|2|reason|\r" mqtt connection status: failed to connect, the reason string indicates the reason why it failed.

Arduino Sample:

softSerial.print("|4|1|1|iot.dfrobot.com.cn|1883|Skv3zKyNb|r1lD3ztJ4b|\r");

results matching ""

    No results matching ""